package announcer;

import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

public class AnnoucerScheduledTask {
	public static final int FILESTORE_ANNOUNCE_PERIOD = 60;
	public static final int NUMBER_OF_STATUS_THREADS = 1;
	private final ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(NUMBER_OF_STATUS_THREADS);
	
	public AnnoucerScheduledTask(Map commandLineParameters){
		scheduler.scheduleAtFixedRate(new AnnouncerHandler(commandLineParameters), 10, FILESTORE_ANNOUNCE_PERIOD, TimeUnit.SECONDS);
	
	}
}
